#ifndef SPAWNER_H
#define SPAWNER_H

#include "Map.h"

class GameObject;
class Player;

// The spawner will add gameobjects to the object manager and map.
// Gameojects will not have to be constructed directly.
class Spawner
{
public:
	enum ID
	{
		ID_BagOfGold = 'G',
		ID_Door = 'D',
		ID_Gate = 'E',
		ID_GateKey = 'X', // random char.
		ID_Key = 'K', 
		ID_Monster = 'M',
		ID_PlayerOne = '1',
		ID_PlayerTwo = '2',
		ID_Room = 'R',
		ID_Wall = '#',
		ID_Projectile = 'P',
		ID_Empty = ' '
	};

	static Spawner* getInstance();
	static void destroyInstance();

	GameObject* spawn(char id, int x, int y, int hDirection = 0, int vDirection = 0, Player* owner = 0);

	void setMap(Map* map);

private:
	static Spawner* spawner;
	Spawner();

	Map* map;
};

#endif